#include <stdio.h>
#include <common.c>

int all_allele_one_char(unsigned char *a) {
    unsigned char seq[SITE_ALLELE_NUM][ALLELE_LEN];
    unsigned int reads[SITE_ALLELE_NUM];
    unsigned int score[SITE_ALLELE_NUM];
    unsigned num = parse_allele_info(a, seq, reads, score);
    unsigned int i;
    for(i = 0; i < num; i ++) {
        if(strlen(seq[i]) > 1 || seq[i][0] == '*')
            return 0;
    }
    return 1;
}

int main(int argc, char *argv[]) {
    while(!feof(stdin)) {
        unsigned int chr, pos;
        float stat, p;
        unsigned char n[ALLELE_INFO_LEN], t[ALLELE_INFO_LEN];
        fscanf(stdin, "%u\t%u\t%f\t%f\t%s\t%s\n", &chr, &pos, &stat, &p, n, t);
        if(all_allele_one_char(n) && all_allele_one_char(t))
            fprintf(stdout, "%u\t%u\t%f\t%f\t%s\t%s\n", chr, pos, stat, p, n, t);
        else
            fprintf(stderr, "%u\t%u\t%f\t%f\t%s\t%s\n", chr, pos, stat, p, n, t);
    }
}
